A Universal Serial Bus (USB) device refers to a scanner, printer, facsimile (Fax), Compact Disk (CD) drive, or any other peripheral device, that communicates with a host over a USB interface. In one configuration, the host is some sort of computer system that communicates to the USB device through a USB interface controller. The USB interface controller contains a collection of configuration values, interfaces (potentially with alternate interface settings), and endpoint parameters that may change for different USB devices. In one embodiment, these configuration values for a particular USB device are hard coded into the USB interface controller.
Because the endpoint configurations are hard coded, the USB device cannot reconfigure the USB interface controller (using software or other means) for different endpoint configurations. This means that different versions of the USB interface controller have to be fabricated for different endpoint configurations in the USB devices. This requires writing and maintaining different Hardware Description Language (HDL) code for each different version of the USB interface controller.
One method used for configuring the USB device uses a script. The script asks a designer a series of questions and then outputs a piece of HDL code that is incorporated into base HDL code. This approach is clumsy, error-prone, and produces HDL code that is difficult to debug and maintain.
The present invention addresses this and other problems associated with the prior art.